﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class Rect
{
    float x;

    public float X
    {
        get { return x; }
        set { x = value; }
    }
    float y;

    public float Y
    {
        get { return y; }
        set { y = value; }
    }
    float width;

    public float Width
    {
        get { return width; }
        set { width = value; }
    }
    float height;

    public float Height
    {
        get { return height; }
        set { height = value; }
    }

    public Rect()
    {
    }

    public Rect(float nX, float nY, float nW, float nH)
    {
        X = nX;
        Y = nY;
        width = nW;
        height = nH;
    }

    public bool Contains(Rect ob)
    {
        if (x + width >= ob.x)
            return true;
        if (x <= ob.x + ob.width)
            return true;
        if (y - height <= ob.y)
            return true;
        if (y >= ob.y - ob.height)
            return true;

        return false;
    }
}